import Vue from "vue";
import Router from "vue-router";
import Home from "@/components/tabbar/home";
import Member from "@/components/tabbar/member";
import Shopcar from "@/components/tabbar/shopcar";
import Search from "@/components/tabbar/search";
import NewsList from "@/components/news/newslist";
import NewsInfo from "@/components/news/newsinfo";
import PhotoList from "@/components/photo/photolist";
import PhotoInfo from "@/components/photo/photoinfo";
import GoodsList from "@/components/goods/GoodsList";
import GoodsInfo from "@/components/goods/GoodsInfo";
import GoodsComment from "@/components/goods/GoodsComment";
import GoodsDesc from "@/components/goods/GoodsDesc";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      redirect: "/home"
    },
    {
      path: "/home",
      name: "home",
      component: Home
    },
    {
      path: "/member",
      name: "member",
      component: Member
    },
    {
      path: "/shopcar",
      name: "shopcar",
      component: Shopcar
    },
    {
      path: "/search",
      name: "search",
      component: Search
    },
    {
      path: "/home/newslist",
      name: "newslist",
      component: NewsList
    },
    {
      path: "/home/newsinfo/:id",
      name: "newsinfo",
      component: NewsInfo
    },
    {
      path: "/home/photolist",
      name: "photolist",
      component: PhotoList
    },
    {
      path: "/home/photoinfo/:id",
      name: "photoinfo",
      component: PhotoInfo
    },
    {
      path: "/home/goodslist",
      name: "goodslist",
      component: GoodsList
    },
    {
      path: "/home/goodsinfo/:id",
      name: "goodsinfo",
      component: GoodsInfo
    },
    {
      path: "/home/goodscomment/:id",
      name: "goodscomment",
      component: GoodsComment
    },
    {
      path: "/home/goodsdesc/:id",
      name: "goodsdesc",
      component: GoodsDesc
    }
  ],
  linkActiveClass:'mui-active'
});
